<?php

declare(strict_types=1);

namespace app\admin\controller;

use addons\Builder\facade\Builder;
//该文件为自动生成，请按需修改
class Bonus extends Base
{
    //主键，默认为id
    protected string $pk = 'id';

    //主模型
    protected string $model = '\app\common\model\Bonus';

    public function index(): string
    {
        return Builder::Table()
            ->autoStructure($this->model, $this->pk, 'barDemo,200')
            ->addRightButtons([
                'bonusDetail' => [
                    'title' => '分红记录',
                    'url'   => url('userBonus/index')->build(),
                    'event' => '_openDrawer',
                    'width' => '100%'
                ],
            ])
            ->fetch();
    }
}
